using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._3DAnalystTools._TINDataset
{
    /// <summary>
    /// <para>Decimate TIN Nodes</para>
    /// <para>Creates a triangulated irregular network (TIN) dataset using a subset of nodes from a source TIN.</para>
    /// <para>使用源 TIN 中的节点子集创建三角不规则网络 （TIN） 数据集。</para>
    /// </summary>    
    [DisplayName("Decimate TIN Nodes")]
    public class DecimateTinNodes : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public DecimateTinNodes()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_tin">
        /// <para>Input TIN</para>
        /// <para>The TIN dataset to process.</para>
        /// <para>要处理的 TIN 数据集。</para>
        /// </param>
        /// <param name="_out_tin">
        /// <para>Output TIN</para>
        /// <para>The TIN dataset that will be generated.</para>
        /// <para>将生成的 TIN 数据集。</para>
        /// </param>
        /// <param name="_method">
        /// <para>Decimation Method</para>
        /// <para><xdoc>
        ///   <para>Specifies the thinning method used for selecting a subset of nodes from the input TIN.</para>
        ///   <bulletList>
        ///     <bullet_item>Z Tolerance—Creates a TIN that will maintain the vertical accuracy specified in the Z Tolerance parameter. This is the default.</bullet_item><para/>
        ///     <bullet_item>Count—Creates a TIN that will not exceed the node limit specified in the Maximum Number of Nodes parameter.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定用于从输入 TIN 中选择节点子集的细化方法。</para>
        ///   <bulletList>
        ///     <bullet_item>Z 公差 （Z Tolerance） - 创建将保持 Z 公差参数中指定的垂直精度的 TIN。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>计数 （Count） - 创建不超过最大节点数参数中指定的节点限制的 TIN。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// </param>
        public DecimateTinNodes(object _in_tin, object _out_tin, _method_value _method)
        {
            this._in_tin = _in_tin;
            this._out_tin = _out_tin;
            this._method = _method;
        }
        public override string ToolboxName => "3D Analyst Tools";

        public override string ToolName => "Decimate TIN Nodes";

        public override string CallName => "3d.DecimateTinNodes";

        public override List<string> AcceptEnvironments => ["extent", "geographicTransformations", "outputCoordinateSystem", "scratchWorkspace", "tinSaveVersion", "workspace"];

        public override object[] ParameterInfo => [_in_tin, _out_tin, _method.GetGPValue(), _copy_breaklines.GetGPValue(), _z_tolerance_value, _max_node_value];

        /// <summary>
        /// <para>Input TIN</para>
        /// <para>The TIN dataset to process.</para>
        /// <para>要处理的 TIN 数据集。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input TIN")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_tin { get; set; }


        /// <summary>
        /// <para>Output TIN</para>
        /// <para>The TIN dataset that will be generated.</para>
        /// <para>将生成的 TIN 数据集。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output TIN")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_tin { get; set; }


        /// <summary>
        /// <para>Decimation Method</para>
        /// <para><xdoc>
        ///   <para>Specifies the thinning method used for selecting a subset of nodes from the input TIN.</para>
        ///   <bulletList>
        ///     <bullet_item>Z Tolerance—Creates a TIN that will maintain the vertical accuracy specified in the Z Tolerance parameter. This is the default.</bullet_item><para/>
        ///     <bullet_item>Count—Creates a TIN that will not exceed the node limit specified in the Maximum Number of Nodes parameter.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定用于从输入 TIN 中选择节点子集的细化方法。</para>
        ///   <bulletList>
        ///     <bullet_item>Z 公差 （Z Tolerance） - 创建将保持 Z 公差参数中指定的垂直精度的 TIN。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>计数 （Count） - 创建不超过最大节点数参数中指定的节点限制的 TIN。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Decimation Method")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public _method_value _method { get; set; }

        public enum _method_value
        {
            /// <summary>
            /// <para>Z Tolerance</para>
            /// <para>Z Tolerance—Creates a TIN that will maintain the vertical accuracy specified in the Z Tolerance parameter. This is the default.</para>
            /// <para>Z 公差 （Z Tolerance） - 创建将保持 Z 公差参数中指定的垂直精度的 TIN。这是默认设置。</para>
            /// </summary>
            [Description("Z Tolerance")]
            [GPEnumValue("Z_TOLERANCE")]
            _Z_TOLERANCE,

            /// <summary>
            /// <para>Count</para>
            /// <para>Count—Creates a TIN that will not exceed the node limit specified in the Maximum Number of Nodes parameter.</para>
            /// <para>计数 （Count） - 创建不超过最大节点数参数中指定的节点限制的 TIN。</para>
            /// </summary>
            [Description("Count")]
            [GPEnumValue("COUNT")]
            _COUNT,

        }

        /// <summary>
        /// <para>Copy Breaklines</para>
        /// <para><xdoc>
        ///   <para>Indicates whether breaklines from the input TIN are copied over to the output.
        ///   <bulletList>
        ///     <bullet_item>Unchecked—Breaklines will not be copied. This is the default.  </bullet_item><para/>
        ///     <bullet_item>Checked—Breaklines will be copied.  </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para><xdoc>
        /// <para>指示是否将输入 TIN 中的分隔线复制到输出。
        ///   <bulletList>
        ///     <bullet_item>未选中 - 不复制换行符。这是默认设置。 </bullet_item><para/>
        ///     <bullet_item>选中 （Checked） - 将复制换行符。</bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Copy Breaklines")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _copy_breaklines_value _copy_breaklines { get; set; } = _copy_breaklines_value._false;

        public enum _copy_breaklines_value
        {
            /// <summary>
            /// <para>BREAKLINES</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("BREAKLINES")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>NO_BREAKLINES</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("NO_BREAKLINES")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Z Tolerance</para>
        /// <para>The maximum deviation from the source TIN's Z-value that will be allowed in the output TIN, which defaults to the lesser of either one-tenth of the Z-range or the number 10.</para>
        /// <para>输出 TIN 中允许的与源 TIN 的 Z 值的最大偏差，默认为 Z 范围的十分之一或数字 10 中的较小者。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Z Tolerance")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public double? _z_tolerance_value { get; set; } = null;


        /// <summary>
        /// <para>Maximum Number of Nodes</para>
        /// <para>The maximum number of nodes that can be stored in the output TIN, which defaults to the total number of nodes in the source TIN minus 1. If the Z-tolerance method is used, the tool will stop processing if the Z tolerance value causes the resulting TIN to exceed the maximum number of nodes.</para>
        /// <para>输出 TIN 中可存储的最大节点数，默认为源 TIN 中的节点总数减去 1。如果使用 Z 容差方法，如果 Z 容差值导致生成的 TIN 超过最大节点数，则工具将停止处理。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Maximum Number of Nodes")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public long? _max_node_value { get; set; } = null;


        public DecimateTinNodes SetEnv(object extent = null, object geographicTransformations = null, object outputCoordinateSystem = null, object scratchWorkspace = null, object tinSaveVersion = null, object workspace = null)
        {
            base.SetEnv(extent: extent, geographicTransformations: geographicTransformations, outputCoordinateSystem: outputCoordinateSystem, scratchWorkspace: scratchWorkspace, tinSaveVersion: tinSaveVersion, workspace: workspace);
            return this;
        }

    }

}